﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using System.Data.SqlClient;

namespace QD.DataBase.DBHelper
{
    public class MSSQLHelper : SQLHelper
    {
        private static MSSQLHelper _instance = null;
        public static MSSQLHelper Instance
        {
            get
            {
                if (_instance == null)
                    _instance = new MSSQLHelper();
                return _instance;
            }
        }

        public override IDbConnection CreateConnection(string connectionString)
        {
            return new SqlConnection(connectionString);
        }

        public override IDbDataAdapter CreateAdapter(IDbCommand cmd)
        {
            return new SqlDataAdapter(cmd as SqlCommand);
        }

        public override IDbCommand CreateCommand()
        {
            return new SqlCommand();
        }


    }
}